<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>MRtrix #VERSION# documentation</title>
<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
</head>

<body>

<table class=nav>
  <tr>
    <td><a href="formats.html"><img src="../left.png"></a></td>
    <td><a href="index.html"><img src="../up.png"></a></td>
    <td><a href="../index.html"><img src="../home.png"></a></td>
    <th>MRView</th>
    <td><a href="../tractography/index.html"><img src="../right.png"></a></td>
  </tr>
</table>

<h2><a name='ref'>Quick reference</a></h2>
<table class='desc'>
  <tr><th>Action</th><th>Achieved by</th></tr>
  <tr><td>brightness/contrast</td><td>right mouse button + move mouse</td></tr>
  <tr><td>set projection</td><td>A - axial<br>S - sagittal<br>C - coronal</td></tr>
  <tr><td>scroll</td><td>up/down arrows or mouse wheel</td></tr>
  <tr><td>zoom</td><td>Home/End <em>or</em> Ctrl + mouse wheel</td></tr>
  <tr><td>pan</td><td>middle mouse button (mouse wheel) + move mouse</td></tr>
  <tr><td>change image volume</td><td>left/right arrows</td></tr>
  <tr><td>cycle through images</td><td>Ctrl + PgUp/PgDown</td></tr>
  <tr><td>copy position of focus</td><td>Drag &amp; drop from statusbar onto destination window</td></tr>
</table>

<p>
Most of these and other actions are available via the relevant menu entries. In
addition, most of these have associated keyboard shortcuts, which are displayed
alongside their entry in the menus for quick reference. Users are encouraged to
explore the menus and familiarise themselves with these shortcuts.
</p>

<p class=sep><a href="#top">top</a></p>
<h2><a name='display'>Displaying images</a></h2>
<p>
MRview can be invoked by typing <kbd>mrview</kbd> on the command line,
double-clicking on the executable,
or clicking on the appropriate shortcut (if one is available).
</p>


<h3><a name='access'>Accessing images</a></h3>

<h4><a name='open'>Opening images</a></h4>
<p>
An image can be opened for display in two ways:
from the command line (by suppling the image identifier 
as an <a href='cmdline.html#basicusage'>argument</a> to <kbd>mrview</kbd>),
or by using the appropriate dialog, found in the 'File-&gt;Open' menu. 
This is shown below:
</p>
<img src='filemenu.png'>
<img src='fileopen.png'>

<p class=sep><a href="#top">top</a></p>
<h4><a name='save'>Saving images</a></h4>
<p>
Once loaded, an image can be saved using the appropriate dialog, found in the 'File-&gt;Save' menu.
As with the command line, the file extension will determine the format of the saved image.
</p>

<p class=sep><a href="#top">top</a></p>
<h4><a name='properties'>Image properties</a></h4>
<p>
The properties of the image can be displayed in the Properties dialog, found in the 'File-&gt;Properties' menu.
</p>
<img src='fileproperties.png'>


<p class=sep><a href="#top">top</a></p>
<h3><a name='navigate'>Navigating through the image</a></h3>

<p>
<strong>Note:</strong> images displayed in MRView are displayed assuming <strong>radiological</strong> convention. 
In other words, the right side of the subject is displayed on the left of the screen, and vice-versa.
</p>

<h4>Projection</h4>
<p>
The projection of the image can be changed by using the 'View-&gt;Axial', 'View-&gt;Sagittal', and 'View-&gt;Coronal' menu entries.
The keyboard shortcuts 'A', 'S', and 'C' can also be used.
</p>
<p>
Selecting a particular point on the image by left-clicking will set this point as the current focus
(use the 'View-&gt;Show focus' menu entry to highlight the current focus using cross-hairs).
When the projection is changed, the slice through the current focus will be shown.
This provides a quick way to access the desired location.
For example, to display an axial slice through the anterior commissure, 
display the image as a sagittal projection and set the current focus at the desired location, then change the projection to axial:
</p>
<img src='focus_sag.png'>
<img src='focus_ax.png'>

<h4>Scrolling</h4>
<p>
Scrolling through the images is done using the up/down arrows, or the mouse scroll wheel.
Pressing the Shift key while scrolling will scroll by 5 slices at a time.

<h4>Zooming</h4>
<p>
Zooming in and out is done by holding down the Ctrl key while using the mouse scroll wheel.
</p>

<h4>Panning</h4>
<p>
The image can be moved side to side within the display by holding down the middle mouse button and moving the mouse.
On a scroll mouse, the middle mouse button is the scroll wheel itself, which can be pressed down without actually turning the wheel.
</p>

<h4>Displaying 4-dimensional data</h4>
<p>
If the image contains more than 3 dimensions (e.g. there is a time or DW direction dimension),
the other volumes contained in the image can be displayed using the left/right arrows.
</p>

<p class=sep><a href="#top">top</a></p>
<h3><a name='window'>Windowing the image</a></h3>
<p>
The image brightness and contrast can be altered by holding the right mouse button and moving the mouse.
Moving the mouse left to right increases the brightness of the image, and moving the mouse up increases the contrast.
</p>


<p class=sep><a href="#top">top</a></p>
<h2><a name='multi'>Displaying multiple images</a></h2>
<p>
Multiple images can be loaded into MRView simultaneously, but only one image can be displayed at any one time.
To select which image to display, use the 'Image' menu. 
Alternatively, you can use the Ctrl + PgUp/PgDown keyboard shortcuts to cycle through the images.
</p>
<p>
MRview will preserve the position of the focus between images, based on the transform (the orientation/position matrix) contained in each image.
If no transform is available, a default transform will be assumed.
Images loaded or converted from <a href='formats.html#DICOM'>DICOM</a> format should contain the correct transform
relative to the scanner axes; these data sets should then be displayed in the same stereotactic space.
</p>


<p class=sep><a href="#top">top</a></p>
<h2><a name='dragdrop'>Copying the position of the focus into other applications</a></h2>
<p>
When experimenting with tractography, it is often required to input the
coordinates of the desired ROI on the command-line. For convenience, this can
be done easily using drag &amp; drop, by dragging from the statusbar (at the
bottom of the main MRView window) and dropping directly onto the command-line
(or any other suitable destination). This will insert the current position of
the focus in real/scanner coordinates as text into the destination window.
</p>


<p class=sep><a href="#top">top</a></p>
<h2><a name='sidebar'>Additional tools: the sidebar</a></h2>
<p>
Additional functionality is accessed via the <em>sidebar</em>. 
Select the 'View-&gt;Sidebar' menu entry (keyboard shortcut: F9) to display the sidebar.
There are a number of tools available, each of which is accessed using the selector at the top of the sidebar:
</p>
<img src=sidebar.png>

<p class=sep><a href="#top">top</a></p>
<h3><a name='tractography'>Tractography</a></h3>
<p>
The tractography tool is used to display tracking results obtained using MRtrix.
Track files are displayed by right-clicking on the 'tracks' list, and selecting 'Open' from the popup menu:
</p>
<img src='open_track.png'>
<p>
By default, tracks are coloured according to their local orientation (red: left-right; green: anterior-posterior; blue: inferior-superior).
This can be changed by right-clicking on the track entry and setting a different colour.
This is useful to differentiate between two different track files displayed at the same time.
</p>
<img src='track_colour.png'>

<p>
Once loaded, the various ROIs used to generate the tracks will be shown in the 'ROIs' list.
Clicking on a particular ROI will place the focus on the centre of the corresponding ROI.
</p>

<p>
By default, the tracks are cropped to a slab centered on the currently displayed slice of the image.
In other words, if the slab thickness is set to 5 mm, 
only the portions of the tracks that lie within 2.5mm either side of the current slice will be visible.
This can be disabled using the appropriate tick-box.
Alternatively, the thickness of the slab can be altered in the corresponding entry.
</p>

<p>
The 'depth blend' tick-box activates a high-quality rendering mode with proper handling of transparency.
However, this requires sorting all the points of the tracks by depth, and can severely affect the responsiveness of the display.
</p>

<p class=sep><a href="#top">top</a></p>
<h3><a name='roi'>ROI analysis</a></h3>
<p>
The ROI analysis tool is used to generate and edit mask ROI images.
A new mask image is created by right-clicking on the ROI list, and selecting 'New' from the popup menu. 
It is recommended to create the ROI in MRtrix format (<kbd>*.mif</kbd> or <kbd>*.mih</kbd>).
An existing mask image can be loaded using the 'Open' entry of the same popup menu.
</p>
<img src=new_roi.png>
<p>
<strong>Note:</strong> all changes made to the ROI image using this tool will immediately be reflected in the file
(this is due to the use of <em>memory-mapping</em> to access the image files). 
<strong>Do not load actual data files</strong> in this tool, as any changes you might make will irreversibly alter the file.

<p>
The newly created image mask is generated using the currently displayed image as a template.
In other words, the new mask image will inherit its image dimensions, voxel size and transform from the image
currently displayed. However, once created, the mask image can be displayed over a different image and edited as described below.
</p>
<p>
Voxels are added to the mask by holding the Shift key and clicking the left mouse button on the desired location. 
Voxels can be removed in a similar way by holding both Ctrl+Shift keys while left-clicking.
There is no need to save the ROI, as all changes made will immediately be synchronised with the image file.
</p>
<img src=roi.png>

<p class=sep><a href="#top">top</a></p>
<h3><a name='overlay'>Overlay</a></h3>
<p>
The Overlay tool is used to display an additional image as a transparent
overlay over the main image. As for the ROI Analysis tool, an image is loaded
by right-clicking in the images list, and selecting 'Open' from the popup menu. 
</p>
<img src=overlay.png>

<p class=sep><a href="#top">top</a></p>
<h3><a name='orientation_plot'>Orientation plot</a></h3>
<p>
The Orientation Plot tool is used to display the Fibre Orientation Distributions (FOD) generated by 
<a href='../tractography/preprocess.html#csd'>Constrained Spherical Deconvolution</a> (CSD).
</p>
<p>
To use it, you first need to load the results of the CSD analysis (click on the "browse" button).
The FOD at the current focus (crosshairs) will be displayed in the viewing pane.
</p>
<img src=orientation_plot.png>
<p>
The orientation plots can also be overlaid directly on the image in the main window using the 'overlay' tickbox:
</p>
<img src=orientation_overlay.png>

<p class=sep><a href="#top">top</a></p>
<h3><a name='screengrab'>Screen Capture</a></h3>
<p>
The Screen Capture tool is used to create simple snapshots of the contents of the main viewing pane. Images are saved in Portable Network Graphic (PNG) format, with a filename formed by concatenating the prefix with the number shown (the number is incremented after each screen capture). It can be used to create screenshots of multiple slices, by specifying the spacing between slices, and the number of slices desired. Finally, it is possible to generate very high-resolution images using the oversampling (OS) setting, which instructs the application to render the image in tiles, using as many tiles across as specified in the OS setting.
</p>
<img src=screenshot.png>

<table class=nav>
  <tr>
    <td><a href="formats.html"><img src="../left.png"></a></td>
    <td><a href="index.html"><img src="../up.png"></a></td>
    <td><a href="../index.html"><img src="../home.png"></a></td>
    <th><a href='#top'>top</a></th>
    <td><a href="../tractography/index.html"><img src="../right.png"></a></td>
  </tr>
</table>

<p class=footer>
Donald Tournier<br>
MRtrix version #VERSION#<br>
Last updated #MTIME#
</p>


</body>
</html>
